<template>
    <div>
        <h1>登录页</h1>
        <button @click="login">函数登录</button>
        <button @click="$router.push('/home')">标签登录</button>

    </div>
</template>

<script setup lang="ts">
//     import {useRouter} from "vue-router"
//    let login=()=>{
//         router.push("/home")
//     }
import { useRouter } from "vue-router";
const router = useRouter();
const login = () => {
  // 处理其他操作
  router.push("/home");
};
</script>

<style scoped>
</style>